Overview of SATA Protocol
With the need for large-scale memory systems for various applications in recent decades has come the need to standardize communication with large-scale memory systems in an effort to increase flexibility of use thereof.
SATA is a high-speed serial link replacement for the parallel Advanced Technology Attachment (ATA) attachment of mass storage devices. The serial link employed is a point-to-point high-speed differential link that utilizes gigabit technology and 8 b/10 b encoding known to those of ordinary skill in the art. The SATA protocol is based on a layered communication model similar to Open Systems Interconnection (OSI) Reference Model. An overview is presented below. For more detail, the reader is referred to the SATA standard or specification, incorporated herein by reference, and provided in the publication entitled “Serial ATA: High Speed Serialized ATA Attachment” or “Serial ATA International Organization: Serial ATA Revisions 2.5, dated Oct. 27, 2005, and the publication entitled “Serial ATA II: Extensions to Serial ATA 1.0”, Revision 2.5, dated Oct. 16, 2002, both of which are currently available at Serial ATA work group web site www.serialata.org.
In the SATA protocol, each layer of protocol communicates with its counterpart directly or indirectly. The serial ATA link is defined by a protocol pursuant to a known standard, having four layers of communications, the physical layer for performing communication at a physical level, a link layer, a transport layer and an application layer or sometimes referred thereto as a command layer. A transmitter and a receiver, cannot directly communicate the latter with each other, rather, they must go through the other layers of their system prior to reaching a corresponding layer of the other. For example, for the physical layer of a transmitter to communicate with the transport layer of the receiver, it must first go through the link, transport and application layers of the transmitter and then through the serial ATA link to the application layer of the receiver and finally to the transport layer of the receiver.
The basic unit of communication or exchange is a frame. A frame comprises of a start of frame (SOF) and end of frame (EOF), which are different delimiters in accordance with the SATA and SAS specifications. In SATA, an STP comprises a frame information structure (FIS), a Cyclic Redundancy Checksum (CRC) calculated over the contents of the FIS and an end of frame (EOF) primitive. The serial ATA organization has defined a specification in which the definition of a frame is provided and which is intended to be used throughout this document. Primitives are double word (Dword) entities that are used to control and provide status of the serial line. The serial ATA organization has defined a specification in which the definition of allowed Primitives is provided and which is intended to be used throughout this document
FIG. 1 shows an example of a frame 30. The frame, in FIG. 1, starts with an SOF primitive 30a, followed by a first FIS content 30b, followed by a HOLD primitive 30c indicating that the transmitter does not have data available, followed by a second FIS content 30d, followed by a HOLDA primitive 30e sent to acknowledge receipt of HOLD primitive, sent by the receiver, indicating that the receiver buffer is in a ‘not ready’ condition, followed by a CRC 30f and an EOF primitive 30g. 
The frame 30, in FIG. 1, includes two primitives a HOLD and a HOLDA primitive used for flow control. A HOLD primitive indicates inability to send or to receive FIS contents. A HOLDA primitive is sent to acknowledge receipt of a HOLD primitive. For example, when a receiving node detects that its buffer is almost full, it will send a HOLD primitive to a transmitting node, requesting the transmitter node to stop and when the buffer is ready to receive more data, the receiving node will stop sending a HOLD primitive. The transmitting node sends a HOLDA primitive to acknowledge receipt of the HOLD primitive. Until receipt of the HOLDA primitive, the receiving node continues receiving data. In order to prevent a buffer overrun, the SATA protocol requires a maximum delay of 20 Dwords between a node sending the HOLD primitive and receiving a HOLDA primitive.
There are a number of different frame types. For example, to send data via Direct Memory Access (DMA), a frame known as DMA setup FIS is utilized followed by a DMA data FIS. There are generally three types of FIS structures, one for commands, one for setting up a transfer and another for data relating to the transfer. Each frame structure is used for a different purpose. A command type of frame is sent to execute a command, a setup frame is used to prepare for the data transfer phase of the command and a data frame is used to transfer data.
A “SATA drive”, as used herein, refers to a media or disk drive conforming to the SATA standard for transferring information from and to the drive. The interface between the drive and the device-coupled thereto is defined by the SATA standard. A “SATA port” is a port adhering to the SATA standard. A “SATA drive” is an example of a “SATA device” and a “SATA device” is an example of a “target”. A “target” is a device that accepts commands and responds to received commands.
There is a need for a device or apparatus for bridging communication between SATA and SAS devices, such as a SATA host and a SATA device or a SAS host and a SATA device or multiple SAS devices with a SATA device.
Using SAS as a link, three different types of communication protocols may be employed to open a connection. They are Serial ATA Tunneled Protocol (STP), SSP and SMP. STP is used in SATA. STP is used to allow SATA communication methods which are defined in the SATA standard, SSP and SMP are used to allow small computer system interface (SCSI) types of communication which is defined in the SAS standards.
Once an STP connection is ‘opened’, the SATA protocol is generally followed. Once an SMP connection is ‘opened’, an SMP protocol is followed. More specifically, a connection is opened and a connection is established, a request frame is sent by an initiator, a response frame is sent by a target and the connection is closed. The foregoing communication technique and further information regarding SAS is found in the SAS standard, a copy of which is located by referring the web site: www.t10.org. A request from the initiator includes a function code within which an area is reserved, as a vendor unique area, to be used to further define a function to be performed by, for example, a target.
An “initiator”, as used herein, refers to a unit or device that sends commands and is capable of receiving responses to sent commands. A “target”, as used herein, refers to a unit or device capable of receiving commands.
Currently, there is no single device for causing communication between two or more SAS ports and a SATA device. Furthermore, there are no end device types, as defined in the SAS standard that report themselves as STP targets, as defined in the. SAS standard. SAS ports are ports conforming to the SAS standard. Moreover, the rate of operation of a SATA device is oftentimes slower than perhaps a SAS host and currently, this difference in performance propagates into the system performance. Thus, there is a need to make a difference in the rate of performance of SAS and SATA devices/hosts to be transparent to the system performance so that there are no apparent delays caused by the slower rate.
In light of the foregoing, the need arises for a high-performance device allowing communication between different topologies of SATA or SAS ports and a SATA device.